{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
  <div class="content-wrapper">
      <section class="content">
          <div class="row">
              <section class="col-lg-12 connectedSortable">
                  <div class="box box-default box-solid">
                      <div class="box-header with-border">
                          <span class="fa fa-thumbs-up" style="float:left; font-size:18px; margin-top:2px; color:#3c8dbc;" ></span>
                          <p class="box-title">教学成果</p>
                          <a href="index.php?a=achieve.add&type={%$type%}" class="btn btn-primary btn-sm" style="float:right; color:#fff;">新 增</a>
                      </div>
                      <div class="box-body">
                          <!--检索-->
                          <form name="myform" action="" method="post">
                          <div class="col-md-3 form-group">
                              <label class="col-sm-4 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
                                  级别：
                              </label>
                              <div class="input-group col-md-8 col-xs-12">
                                  <select class="form-control" name="prizelv">
                                      <option value="all"> 全部 </option>
                                      {%foreach from=$prizelv key=key item=value%}
                                      <option value="{%$value.prizelv_id%}" {%if $lv eq $value.prizelv_id %}selected{%/if%}> {%$value.prizelv_name%}</option>
                                      {%/foreach%}
                                  </select>
                              </div>
                          </div>
                          <div class="col-md-3 form-group" style="padding:0;">
                              <label for="inputPassword3" class="col-sm-4 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; margin:0;">
                                  获奖名次：
                              </label>
                              <div class="input-group col-md-8 col-xs-12">
                                  <select class="form-control" name="prize">
                                      <option value="all"> 全部 </option>
                                      {%foreach from=$prize key=key item=value%}
                                      <option value="{%$value.prize_id%}" {%if $rank eq $value.prize_id %}selected{%/if%}> {%$value.prize_name%}</option>
                                      {%/foreach%}
                                  </select>
                              </div>
                          </div>
                          <div class="col-md-5 col-xs-12 form-group" style="padding:0;">
                              <label for="inputPassword3" class="col-sm-2 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; ">
                                  时间：
                              </label>
                              <div class="input-group col-md-4" style="float:left;">
                                  <input type="text" class="form-control" value="{%$from%}" id="from" name="from">
                                  <div class="input-group-addon" style="padding:6px 7px;">
                                      <i class="fa fa-calendar"></i>
                                  </div>
                              </div>
                              <span style="float:left;">  ~  </span >
                              <div class="input-group col-md-4" style="float:left;">
                                  <input type="text" class="form-control" value="{%$to%}" id="to" name="to">
                                  <div class="input-group-addon" style="padding:6px 7px;">
                                      <i class="fa fa-calendar"></i>
                                  </div>
                              </div>
                          </div>
                          <div class="col-md-1 col-xs-12" style="padding:0">
                              <button type="submit" class="btn btn-warning">查 询</button>
                          </div>
                          <div style="clear:both; height:10px;"></div>
                          <!--检索-->
                          <a href="index.php?a=achieve.list&type=1" {%if $type eq 1 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>集体获奖</a>
                          <a href="index.php?a=achieve.list&type=2" {%if $type eq 2 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>教师获奖</a>
                          <a href="index.php?a=achieve.list&type=3" {%if $type eq 3 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>课件获奖</a>
                          <a href="index.php?a=achieve.list&type=4" {%if $type eq 4 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>课例获奖</a>
                          <a href="index.php?a=achieve.list&type=5" {%if $type eq 5 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>学生获奖</a>
                          <a href="index.php?a=achieve.list&type=7" {%if $type eq 7 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>指导教师奖</a>
                          <a href="index.php?a=achieve.list&type=6" {%if $type eq 6 %} class="btn btn-success" {%else%} class="btn btn-default" {%/if%}>论文著作</a>
                          <span style="float:right"> 总共有{%$count%}条记录</span>
                          <table class="table table-bordered table-striped" id="mytable">
                              {%if $type lt 6 %}
                              <thead>
                              <tr style=" background-color:#5fb2dc;">
                                  <td>获奖名称</td>
                                  <td>主办单位</td>
                                  <td>级别</td>
                                  <td>名次</td>
                                  <td>获奖者</td>
                                  <td>获奖时间</td>
                                  {%if $type eq 5 %}
                                  <td>第一指导老师</td>
                                  <td>其他指导老师</td>
                                  {%/if%}
                                  <td>备注</td>
                                  <!--<td>附件</td>-->
                                  <td  width="140">操作</td>
                              </tr>
                              </thead>
                              {%foreach from=$achieve_lists key=key item=value%}
                              <tr>
                                  <td>{%$value.achieve_name%}</td>
                                  <td>{%$value.achieve_unit%}</td>
                                  <td>{%$value.achieve_lv%}</td>
                                  <td>{%$value.achieve_rank%}</td>
                                  <td>{%$value.achieve_owner%}</td>
                                  <td>{%$value.achieve_time%}</td>
                                  {%if $type eq 5 %}
                                  <td>{%$value.achieve_teach%}</td>
                                  <td>{%$value.achieve_teachers%}</td>
                                  {%/if%}
                                  <td>{%$value.achieve_remark%}</td>
                                  <!--<td><a href="upload/achieve_file/{%$value.achieve_file%}" download="" style="color:#666">附件</a></td>-->
                                  <td>
                                      <a href="index.php?a=achieve.info&type={%$type%}&achieve_id={%$value.achieve_id%}" class="btn btn-success btn-sm" title="查看"><i class="fa fa-search"></i></a>
                                      <a href="index.php?a=achieve.update&type={%$type%}&achieve_id={%$value.achieve_id%}" class="btn btn-warning btn-sm" title="修改"><i class="fa fa-edit (alias)"></i></a>
                                      <a href="index.php?a=achieve.del&achieve_id={%$value.achieve_id%}" class="btn btn-danger btn-sm" title="删除" onclick="if(confirm('警告！确认删除信息?')==false)return false;"><i class="fa fa-trash"></i></a>
                                  </td>
                              </tr>
                              {%/foreach%}
                              {%/if%}

                              {%if $type eq 6 %}
                              <thead>
                              <tr style=" background-color:#5fb2dc;">
                                  <td>获奖名称</td>
                                  <td>出版社</td>
                                  <td>书号</td>
                                  <td>所在页</td>
                                  <td>级别</td>
                                  <td>发表者</td>
                                  <td>出版时间</td>
                                  <td>备注</td>
                                  <!--<td>附件</td>-->
                                  <td  width="140">操作</td>
                              </tr>
                              </thead>
                              {%foreach from=$achieve_lists key=key item=value%}
                              <tr>
                                  <td>{%$value.achieve_name%}</td>
                                  <td>{%$value.achieve_publish%}</td>
                                  <td>{%$value.achieve_bookno%}</td>
                                  <td>{%$value.achieve_page%}</td>
                                  <td>{%$value.achieve_lv%}</td>
                                  <td>{%$value.achieve_owner%}</td>
                                  <td>{%$value.achieve_time%}</td>
                                  <td>{%$value.achieve_remark%}</td>
                                  <!--<td><a href="index.php?a=achieve.file&achieve_id={%$value.achieve_id%}&fname={%$value.achieve_file%}" style="color:#666">{%$value.achieve_fname%}</a></td>-->
                                  <td>
                                      <a href="index.php?a=achieve.info&type={%$type%}&achieve_id={%$value.achieve_id%}" class="btn btn-success btn-sm" title="查看"><i class="fa fa-search"></i></a>
                                      <a href="index.php?a=achieve.update&type={%$type%}&achieve_id={%$value.achieve_id%}" class="btn btn-warning btn-sm" title="修改"><i class="fa fa-edit (alias)"></i></a>
                                      <a href="index.php?a=achieve.del&achieve_id={%$value.achieve_id%}" class="btn btn-danger btn-sm" title="删除" onclick="if(confirm('警告！确认删除信息?')==false)return false;"><i class="fa fa-trash"></i></a>
                                  </td>
                              </tr>
                              {%/foreach%}
                              {%/if%}
                              {%if $type eq 7 %}
                              <thead>
                              <tr style=" background-color:#5fb2dc;">
                                  <td>获奖名称</td>
                                  <td>获奖者</td>
                                  <td>获奖级别</td>
                                  <td>第一指导老师</td>
                                  <td>本人排名</td>
                                  <td>授奖单位</td>
                                  <td>获奖时间</td>
                                  <td>备注</td>
                                  <!--<td>附件</td>-->
                                  <td  width="140">操作</td>
                              </tr>
                              </thead>
                              {%foreach from=$achieve_lists key=key item=value%}
                              <tr>
                                  <td>{%$value.achieve_name%}</td>
                                  <td>{%$value.achieve_owner%}</td>
                                  <td>{%$value.achieve_lv%}</td>
                                  <td>{%$value.achieve_teach%}</td>
                                  <td>{%$value.achieve_trank%}</td>
                                  <td>{%$value.achieve_unit%}</td>
                                  <td>{%$value.achieve_time%}</td>
                                  <td>{%$value.achieve_remark%}</td>
                                 <!-- <td><a href="index.php?a=achieve.file&achieve_id={%$value.achieve_id%}&fname={%$value.achieve_file%}" style="color:#666">{%$value.achieve_fname%}</a></td>-->
                                  <td>
                                      <a href="index.php?a=achieve.info&type={%$type%}&achieve_id={%$value.achieve_id%}" class="btn btn-success btn-sm" title="查看"><i class="fa fa-search"></i></a>
                                      <a href="index.php?a=achieve.update&type={%$type%}&achieve_id={%$value.achieve_id%}" class="btn btn-warning btn-sm" title="修改"><i class="fa fa-edit (alias)"></i></a>
                                      <a href="index.php?a=achieve.del&achieve_id={%$value.achieve_id%}" class="btn btn-danger btn-sm" title="删除" onclick="if(confirm('警告！确认删除信息?')==false)return false;"><i class="fa fa-trash"></i></a>
                                  </td>
                              </tr>
                              {%/foreach%}
                              {%/if%}

                          </table>
                              <div class="box-footer">
                                  {%$page%}
                              </div>
                              </form>
                      </div><!--box-body -->
                  </div><!--box box-default box-solid-->
              </section>
          </div><!--row-->
      </section>
 </div>
  <!--主要内容结束-->
 
  {%include file="index.footer.tpl.php"%}
<script>
    $(function() {
        $( "#from" ).datepicker({
            defaultDate: "+1w",
            changeMonth: true,
            changeYear: true,
            numberOfMonths:1,
            onClose: function( selectedDate ) {
                $( "#to" ).datepicker( "option", "minDate", selectedDate );
            }
        });
        $( "#to" ).datepicker({
            defaultDate: "+1w",
            changeMonth: true,
            changeYear: true,
            numberOfMonths:1,
            onClose: function( selectedDate ) {
                $( "#from" ).datepicker( "option", "maxDate", selectedDate );
            }
        });
    });
</script>

